<#include "/inc.ftl">
<#include "/page/lib/keyValueUtil.ftl">
<#include "/page/testplan/buildTest.ftl">
<#include "/page/testplan/addTestPlan.ftl">
<#include "/page/testplan/topPlan.ftl"/>
<#macro diamondNav >
<body class="hold-transition skin-blue sidebar-mini">
<div >
    <div class="myWrapper">
    <#--导航栏-->
        <header class="main-header">
            <!-- Logo -->
            <a href="#" class="logo">
                <!-- mini logo for sidebar mini 50x50 pixels -->
                <span class="logo-mini"><b>Diamond</b></span>
                <!-- logo for regular state and mobile devices -->
                <span class="logo-lg"><b>金刚石</b>接口测试平台</span>
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top">
                <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                    <span class="sr-only">Toggle navigation</span>
                </a>
                <ul class="nav navbar-nav" style="float: right">
                    <li>
                        <div style="padding-top: 15px;padding-bottom: 15px;position: relative;display: block;color: white">
                            ${Session.user.userName} 欢迎您！
                            当前所在的项目是：
                        <#--selectProject的绑定事件在projectUtil.js里面-->
                            <select id="selectProject" class="themes">
                            <#--遍历用户有权限的项目列表-->
                                <#if Session.user?? && Session.user.projectList??>
                                    <#list Session.user.projectList as project>
                                    <#--如果用户的lastProjectId等于项目列表里面的projectId，那么选中改项目-->
                                        <#if project.projectId==Session.user.lastProjectId>
                                             <option value="${project.projectId}" selected>${project.projectName}</option>
                                        <#else >
                                             <option value="${project.projectId}">${project.projectName}</option>
                                        </#if>
                                    </#list>
                                </#if>
                            </select>
                        </div>
                    </li>
                    <!-- Messages: style can be found in dropdown.less-->
                    <li>
                        <a href="/loginController/loginOut" class="dropdown-toggle">
                            <i class="fa fa-sign-out" title="注销"></i>
                        </a>
                    </li>
                    <!-- Notifications: style can be found in dropdown.less -->
                    <li>
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-book" title="帮助文档"></i>
                        </a>
                    </li>
                </ul>
            </nav>
        </header>
    </div>
</div>
<!-- Left side column. contains the logo and sidebar -->
<div class="left" style="margin-right: 5%">
<#--左侧菜单-->
    <aside style="background-color: #222d32" class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel">
                <div class="pull-left image">
                <#--<img src="lib/adminLte-2.4.5/img/user2-160x160.jpg" class="img-circle" alt="User Image">-->
                    <img src="/images/base/logo.png">
                </div>
            </div>
            <!-- search form -->
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="Search...">
                    <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
                </div>
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree">
                <li class="header">菜单栏</li>
                <li>
                    <a href="${base}/index">
                        <i class="fa fa-dashboard"></i> <span>首页</span>
                        <span class="pull-right-container">
                        </span>
                    </a>
                </li>
                <li>
                    <a href="${base}/interfaceTestController/interfaceTestPage">
                        <i class="fa fa-files-o"></i>
                        <span>接口管理</span>
                        <span class="pull-right-container">
                        </span>
                    </a>
                </li>
                <li>
                    <a href="${base}/interfaceMockController/interfaceMockPage">
                        <i class="fa fa-th"></i> <span>接口mock</span>
                        <span class="pull-right-container">
                    </span>
                    </a>
                </li>
                <li>
                    <a href="${base}/testPlanController/planPage">
                        <i class="fa fa-laptop"></i>
                        <span>测试计划</span>
                    </a>
                </li>
                <li class="treeview">
                    <a href="${base}/toolController/tooPage">
                        <i class="fa fa-edit"></i> <span>工具箱</span>
                        <span class="pull-right-container">
                         <i class="fa fa-angle-left pull-right"></i>
                     </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="pages/tables/simple.html"><i class="fa fa-circle-o"></i>http请求</a></li>
                        <li><a href="pages/tables/data.html"><i class="fa fa-circle-o"></i>rest请求</a></li>
                    </ul>
                </li>
                <li>
                    <a href="${base}/projectController/projectPage">
                        <i class="fa fa-table"></i> <span>项目管理</span>
                    </a>
                </li>
            </ul>
        </section>
    </aside>
</div>
</body>
</#macro>
<script>
    $.widget.bridge('uibutton', $.ui.button);
</script>
<style>
    .myWrapper {
        height: 7%;
        position: relative;
        overflow-x: hidden;
        overflow-y: auto;
        background-color: #ecf0f5;
    }

    .content-header {
        position: relative;
        padding: 0px 5px 0 5px;
    }
    .panel-body {
        padding: 0px;
        position: relative;
        width: auto;
    }
    .themes {
        float: right;
        margin-top: 1px;
        width: 200px;
        height: 25px;
        color: #2a2a2a;
    }
    /*.table-bordered   tr , td {*/
        /*border: 1px solid grey; !* 整体表格边框 *!*/
    /*}*/
    /*a.logout {*/
        /*background: url(../../images/base/icon-logout.png) no-repeat 9px 9px;*/
        /*margin-top: 1px;*/
    /*}*/
</style>
<script type="text/javascript">
    projectId =${Session.user.lastProjectId!} ;
</script>